package com.tech.connect.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;

import com.ksy.common.utils.BaseAdapter;
import com.ksy.common.utils.BaseHolder;
import com.ksy.common.view.HLineDivider;
import com.tech.connect.R;

import java.util.ArrayList;
import java.util.List;

public class MyFaBuJianLiActivity extends BaseActivity {

    private RecyclerView recycler;
    private BaseAdapter<String, BaseHolder> adapter;
    private List<String> allList = new ArrayList<>();

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getHeadBar().setTitle("我的发布-简历");
        setContentView(R.layout.layout_recycler);
        initView();
        loadData();
    }

    private void loadData() {

    }

    private void initView() {
        recycler = findViewById(R.id.recycler);
        LinearLayoutManager layoutManager = new LinearLayoutManager(activity, LinearLayoutManager.VERTICAL, false);
        recycler.setLayoutManager(layoutManager);
        recycler.addItemDecoration(new HLineDivider());
    }

    private void initAdapter() {
        if (adapter == null) {
            adapter = new BaseAdapter<String, BaseHolder>(R.layout.item_layout_fabu_jianli,allList ) {
                @Override
                protected void convert(BaseHolder helper, int position) {

                }
            };
            adapter.setOnItemClickListener(new BaseAdapter.OnItemClickListener() {
                @Override
                public void onItemClick(View view, int position) {

                }
            });
            recycler.setAdapter(adapter);
        }
        adapter.notifyDataSetChanged();
    }
}
